import { defineStore } from "pinia";
type Theme = 'light' | 'dark';
type Lang = 'zhCn' | 'en';

export const useAppStore = defineStore('appStore', {
    state: () => ({
        theme: 'light',
        version:'v0.1.0',
        lang:'zhCn'
    }),
    actions: {
        setThemeMode(theme:Theme) {
            this.theme = theme;
        },
        setVersion(version:string){
            this.version = version;
        },
        setLangMode(lang: Lang){
            this.lang = lang;
        }
    }
})

